using System;
using System.Collections.Generic;
using System.Text;
namespace MyDMS.BusinessLayer
{
	public class UploadedDocument: BusinessObjectBase
	{

		#region InnerClass
		public enum UploadedDocumentFields
		{
			Document_Code,
			Document_Name,
			Document_Desc,
			File_Path,
			Recieved_Date,
			Hard_Location,
			Owner,
			Document_Type,
			Office_Code,
			Is_Active,
			Creation_Date,
			Updation_Date
		}
		#endregion

		#region Data Members

			int _document_Code;
			string _document_Name;
			string _document_Desc;
			string _file_Path;
			DateTime _recieved_Date;
			string _hard_Location;
			int _owner;
			int _document_Type;
			int _office_Code;
			bool? _is_Active;
			DateTime? _creation_Date;
			DateTime? _updation_Date;

		#endregion

		#region Properties

		public int  Document_Code
		{
			 get { return _document_Code; }
			 set
			 {
				 if (_document_Code != value)
				 {
					_document_Code = value;
					 PropertyHasChanged("Document_Code");
				 }
			 }
		}

		public string  Document_Name
		{
			 get { return _document_Name; }
			 set
			 {
				 if (_document_Name != value)
				 {
					_document_Name = value;
					 PropertyHasChanged("Document_Name");
				 }
			 }
		}

		public string  Document_Desc
		{
			 get { return _document_Desc; }
			 set
			 {
				 if (_document_Desc != value)
				 {
					_document_Desc = value;
					 PropertyHasChanged("Document_Desc");
				 }
			 }
		}

		public string  File_Path
		{
			 get { return _file_Path; }
			 set
			 {
				 if (_file_Path != value)
				 {
					_file_Path = value;
					 PropertyHasChanged("File_Path");
				 }
			 }
		}

		public DateTime  Recieved_Date
		{
			 get { return _recieved_Date; }
			 set
			 {
				 if (_recieved_Date != value)
				 {
					_recieved_Date = value;
					 PropertyHasChanged("Recieved_Date");
				 }
			 }
		}

		public string  Hard_Location
		{
			 get { return _hard_Location; }
			 set
			 {
				 if (_hard_Location != value)
				 {
					_hard_Location = value;
					 PropertyHasChanged("Hard_Location");
				 }
			 }
		}

		public int  Owner
		{
			 get { return _owner; }
			 set
			 {
				 if (_owner != value)
				 {
					_owner = value;
					 PropertyHasChanged("Owner");
				 }
			 }
		}

		public int  Document_Type
		{
			 get { return _document_Type; }
			 set
			 {
				 if (_document_Type != value)
				 {
					_document_Type = value;
					 PropertyHasChanged("Document_Type");
				 }
			 }
		}

		public int  Office_Code
		{
			 get { return _office_Code; }
			 set
			 {
				 if (_office_Code != value)
				 {
					_office_Code = value;
					 PropertyHasChanged("Office_Code");
				 }
			 }
		}

		public bool?  Is_Active
		{
			 get { return _is_Active; }
			 set
			 {
				 if (_is_Active != value)
				 {
					_is_Active = value;
					 PropertyHasChanged("Is_Active");
				 }
			 }
		}

		public DateTime?  Creation_Date
		{
			 get { return _creation_Date; }
			 set
			 {
				 if (_creation_Date != value)
				 {
					_creation_Date = value;
					 PropertyHasChanged("Creation_Date");
				 }
			 }
		}

		public DateTime?  Updation_Date
		{
			 get { return _updation_Date; }
			 set
			 {
				 if (_updation_Date != value)
				 {
					_updation_Date = value;
					 PropertyHasChanged("Updation_Date");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Document_Code", "Document_Code"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Document_Name", "Document_Name"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Document_Name", "Document_Name",200));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Document_Desc", "Document_Desc",500));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("File_Path", "File_Path"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("File_Path", "File_Path",500));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Recieved_Date", "Recieved_Date"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Hard_Location", "Hard_Location",50));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Owner", "Owner"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Document_Type", "Document_Type"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Office_Code", "Office_Code"));
		}

		#endregion

	}
}
